import { createRouter, createWebHistory } from 'vue-router'
import loginView from '../views/login.vue'
import indexView from '../views/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: loginView // 正确的组件名称
    },
    {
      path: '/index',
      name: 'index',
      component: indexView // 正确的组件名称
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue')
    }
  ]
})

export default router
